package com.easylinkin.linkappapi.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easylinkin.linkappapi.device.entity.Device;
import com.easylinkin.linkappapi.device.entity.DeviceRefAreaScope;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 设备关联功能关联作用区域 Mapper 接口
 * </p>
 *
 * @author TongJie
 * @since 2021-05-12
 */
public interface DeviceRefAreaScopeMapper extends BaseMapper<DeviceRefAreaScope> {

    List<Device> getDeviceListByAreaPathAndFunctionIdentifier(Page page, @Param("dras") DeviceRefAreaScope dras);

    List<Device> getDeviceListByAreaPathAndFunctionIdentifier(@Param("dras") DeviceRefAreaScope dras);

    /**
     * 车辆告警定添加接口
     * @param dras
     * @return
     */
    List<Device> getDeviceInfoByFunctionIdentifier(@Param("dras") DeviceRefAreaScope dras);

    Integer getBindDeviceCount(@Param("deviceCode") String deviceCode);

    void batchInsert(@Param("drasList") List<DeviceRefAreaScope> drasList);

    List<DeviceRefAreaScope> findAllByTenantId(@Param("tenantId")String tenantId);
}
